package com.ruoyi.wxdaiqu.controller;

import com.ruoyi.wxdaiqu.pojo.Helplist;
import com.ruoyi.wxcommon.common.Result;
import com.ruoyi.wxdaiqu.service.IHelplistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 帮助列表 前端控制器
 * </p>
 *
 * @author 凡哥哥
 * @since 2024-05-28
 */
@RestController
@RequestMapping("/helplist")
public class HelplistController {
    @Autowired
    IHelplistService helplistService;

    @PostMapping("/anlysis/wx/sm")
    public Result anlysisWxSm(Integer wxId,String comTime){
        return helplistService.anlysisWxSm(wxId, comTime);
    }
    @PostMapping("/confirm")
    public Result confirm(Integer id){
        return helplistService.confirm(id);
    }

    @PostMapping("/add")
    public Result substitution(Helplist helplist){
        return helplistService.addSubstitutionTask(helplist);
    }
    @GetMapping("/{get}")
    public Result getArea(@PathVariable String get,Integer pageIndex, Integer pageSize,Integer aId,Integer wxId,Integer id){
        return helplistService.getAreaId(get, pageIndex,pageSize,aId,wxId,id);
    }
    @PostMapping("/jd")
    public Result jd(Integer id,String openId,String title,Integer jdId,Integer state){
        return helplistService.jd(id,openId,title,jdId,state);
    }
    @PostMapping("/update/state")
    public Result updateState(Integer oId,Integer state){
        return helplistService.updateState(oId,state);
    }
    //@PostMapping("pay")
    public Result pay(String title,String openId,Double price){
        return helplistService.pay(title,openId,price);
    }

}

